<template>
  <el-container>
    <el-header height="auto">
      <Header>
      </Header>
      <div id="state">
        <status-bar></status-bar>
      </div>
    </el-header>
    <el-container>
      <el-aside width="300px">
        <sidebar></sidebar>
      </el-aside>
      <el-container>
        <el-main>
          <!--功能组件-->
          <Personal-information v-if="functionName === '个人信息' "></Personal-information>
        </el-main>
        <el-footer height="auto">
          <Footer></Footer>
        </el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script>
  import Header from '../components/login/header'
  import Footer from '../components/login/footer'
  import statusBar from '../components/mainPage/statusBar'
  import sidebar from '../components/mainPage/sidebar'
  import PersonalInformation from '../components/mainPage/personalInformation'

  export default {
    name: "homePage",
    components: {
      Header,
      Footer,
      statusBar,
      sidebar,
      PersonalInformation
    },
    data(){
      return{
        functionName: this.$route.params.cardName
      }
    }
  }
</script>

<style scoped>
  .el-header {
    position: relative;
    padding: 0;
  }

  .el-footer{
    padding: 0;
  }

  #state {
    position: absolute;
    right: 50px;
    bottom: 10px;
  }
</style>
